package com.ruowei.modules.foodOrder.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.foodOrder.domain.OrderItem;

import com.ruowei.modules.foodOrder.domain.QOrderItem;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

import java.util.List;

/**
 * Spring Data  repository for the OrderItem entity.
 */
@Repository
public interface OrderItemRepository extends BaseRepository<Long, OrderItem, QOrderItem> {

    Optional<OrderItem> findByOrderCode(String orderCode);

    Optional<OrderItem> findFirstByOrderCode(String orderCode);

//    Optional<List<OrderItem>> findAllByOrderCode(String orderCode);

    List<OrderItem> findAllByOrderCode(String orderCode);
}
